﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;

using System.Text;
using System.Windows.Forms;

namespace ArcEngine.Editor.Wizards
{
	public partial class NewStringTableWizard : Form
	{
		public NewStringTableWizard()
		{
			InitializeComponent();
		}


		/// <summary>
		/// 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void NewStringTableWizard_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (DialogResult != DialogResult.OK)
				return;

			// Script already exists ?
			if (ResourceManager.GetStringTable(StringTableNameBox.Text) != null || StringTableNameBox.Text == "")
			{
				MessageBox.Show("StringTable name already in use or invalid. Use another name !");
				e.Cancel = true;
				return;
			}

			// Adds the texture file as a binary
			ResourceManager.CreateStringTable(StringTableNameBox.Text);


		}

	}
}
